package com.xbao.service.impl;

import com.xbao.dao.ClsNotifyMapper;
import com.xbao.model.ClsExample;
import com.xbao.model.ClsNotify;
import com.xbao.service.ClsNotifyService;
import org.springframework.stereotype.Service;

@Service
public class ClsNotifyServiceImpl implements ClsNotifyService {
    private ClsNotifyMapper notifyMapper;
    @Override
    public void saveClsNotify(ClsNotify clsNotify) {
        ClsNotify temp=detail(clsNotify.getId());
        if(temp!=null){
            notifyMapper.updateByPrimaryKeySelective(clsNotify);
        }
        notifyMapper.insert(clsNotify);


    }

    @Override
    public ClsNotify detail(Long id) {
       return notifyMapper.selectByPrimaryKey(id);

    }
}
